<template>
    <div class="component-think-list">
        <ul class="list">
            <li class="list-item" v-for="(item, key) in list" :key="key" @click="handleItemClick(item.id)">
                <div class="top">{{item.title}}</div>
                <div class="bottom">
                    <div class="left"><img src="../assets/expert1.png" /></div>
                    <div class="right">
                        <div class="center mb12"><img src="../assets/list-lecturer.svg">{{item.name}}</div>
                        <div class="center"><img src="../assets/list-time.svg">{{item.date}}</div>
                        <div class="last">
                            <div class="center"><img src="../assets/list-locate.svg">下载量：{{item.number}}</div>
                            <div class="radius">{{item.state}}</div>
                        </div>
                    </div>
                </div>
            </li>
        </ul>
    </div>
</template>

<style lang="less" scoped>
    @import '../style/variable';
    .component-think-list {
        .list {
            background-color: @color-white;
            padding-left: 1.5rem;
            &-item {
                border-bottom: 1px solid rgba(0,0,0,.1);
                padding: 1rem 0.7rem 1.9rem 0;
                display: flex;
                flex-direction: column;
                .top{
                    color: #333E48;
                    font-size: 1.5rem;
                    font-weight: 500;
                    margin-bottom: 1.3rem;
                }
                .bottom{
                    display: flex;
                    align-items: center;
                    .left {
                        width: 6.9rem;
                        height: 6.9rem;
                        margin-right: 1.1rem;
                        img {
                            height: 100%;
                        }
                    }
                    .right{
                        width: 100%;
                        display: flex;
                        flex-direction: column;
                        justify-content: center;
                        font-size: 1.3rem;
                        img {
                            height: 1.4rem;
                            margin-right: 0.7rem;
                        }
                        .last {
                            width: 100%;
                            display: flex;
                            justify-content: space-between;
                            align-items: flex-end;
                            .btn {
                                display: flex;
                                align-items: center;
                                padding: 0.6rem;
                                border: 1px solid #949494;
                                border-radius: 0.3rem;
                                color: #7A7A7A;
                                img{
                                    margin-right: 0.5rem;
                                }
                            }
                            .radius {
                                font-size: 1.2rem;
                                color: #097FFF;
                                border-radius: 1.4rem;
                                background-color: #F0F0F7;
                                padding: 0.7rem 1.5rem;
                            }
                        }
                        .center{
                            display: flex;
                            align-items: center;
                        }
                        .mb12 {
                            margin-bottom: 1.2rem;
                        }
                    }
                }
            }
        }
    }
</style>

<script>
    export default {
        props: ['list'],
        methods: {
            handleItemClick(id){
                this.$emit('onclick', id);
            }
        }
    }
</script>